#ifndef CGUIDEFAULTSTYLESLOADER_H_
#define CGUIDEFAULTSTYLESLOADER_H_

#include "cdefaultstyles.h"
#include "../string/parser/capfparser.h"

/**
 * CGuiDefaultStylesLoader - class importing default graphical styles
 * @author Michal Rost
 * @date 04.07.2008
 */
class CGuiDefaultStylesLoader : public CObject {
public:
  static CDefaultStyles loadStyle(string fileName, CLogger* logPtr = NULL);
  static string getClassName() {
    return "CGuiDefaultStylesLoader";
  }
  static const int DEFAULT_DIALOG = 0;
  static const int DEFAULT_BUTTON = 1;
  static const int DEFAULT_COMBO = 2;
  static const int DEFAULT_EDIT = 3;
  static const int DEFAULT_LABEL = 4;
  static const int DEFAULT_SPIN = 5;
  static const int STYLE_DEFAULT = 0;
  static const int STYLE_NORMAL = 1;
  static const int STYLE_FOCUS = 2;
  static const int STYLE_PRELIGHT = 3;
  static const int STYLE_DISABLED = 4;
protected:
  static map<int, map<int, CGuiStyle> > readRootNode(CAPFNode* node);
  static map<int, CGuiStyle> readDialog(
      vector<CAPFNode*>::const_iterator node);
  static map<int, CGuiStyle> readComponent(
      vector<CAPFNode*>::const_iterator node);
  static CGuiStyle readStyle(vector<CAPFNode*>::const_iterator node);
  static CBorder readBorder(vector<CAPFNode*>::const_iterator node);
};

#endif
